From d047b4c050c295a3232b98fb39bcfa0a353eace2 Mon Sep 17 00:00:00 2001 From: George Sapkin Date: Sat, 1 Nov 2025 02:38:10 +0200 Subject: [PATCH] syncthing: fix maxprocs config option name Map old config option "macprocs" to new one. Signed-off-by: George Sapkin --- utils/syncthing/Makefile | 2 +- utils/syncthing/files/syncthing.conf | 2 +- utils/syncthing/files/syncthing.init | 14 +++++++++----- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/utils/syncthing/Makefile b/utils/syncthing/Makefile index 9b8621c1df..071d2fa669 100644 --- a/utils/syncthing/Makefile +++ b/utils/syncthing/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=syncthing PKG_VERSION:=2.0.10 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=syncthing-source-v$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/syncthing/syncthing/releases/download/v$(PKG_VERSION) diff --git a/utils/syncthing/files/syncthing.conf b/utils/syncthing/files/syncthing.conf index 51b18f9d66..2c1b6d0e2e 100644 --- a/utils/syncthing/files/syncthing.conf +++ b/utils/syncthing/files/syncthing.conf @@ -16,7 +16,7 @@ config syncthing 'syncthing' # 0 to match the number of CPUs (default) # >0 to explicitly specify concurrency - option macprocs '0' + option maxprocs '0' # More info: https://docs.syncthing.net/users/syncthing.html # option db_delete_retention_interval '' diff --git a/utils/syncthing/files/syncthing.init b/utils/syncthing/files/syncthing.init index f51dc32b52..b50abf74f4 100644 --- a/utils/syncthing/files/syncthing.init +++ b/utils/syncthing/files/syncthing.init @@ -21,6 +21,10 @@ config_cb() { option='log_file' ;; + macprocs) + option='maxprocs' + ;; + esac eval $option="$value" @@ -44,7 +48,7 @@ start_service() { local log_level='INFO' local log_max_old_files=7 local log_max_size=1048576 - local macprocs=0 + local maxprocs=0 local nice=0 local user='syncthing' @@ -58,16 +62,16 @@ start_service() { # A separate step to handle an upgrade use case [ -d "$home" ] && chown -R $user:$group "$home" - # Changes to "niceness"/macprocs are not picked up either by reload_config + # Changes to "niceness"/maxprocs are not picked up either by reload_config # or by restart: the service has to be stopped/started for it to take effect - if [ $macprocs -le 0 ]; then + if [ $maxprocs -le 0 ]; then # Default to the number of cores in this case - macprocs=$(grep -c ^processor /proc/cpuinfo) + maxprocs=$(grep -c ^processor /proc/cpuinfo) fi procd_open_instance procd_set_param command "$PROG" - procd_set_param env GOMAXPROCS="$macprocs" + procd_set_param env GOMAXPROCS="$maxprocs" procd_append_param command serve [ -z "$db_delete_retention_interval" ] || \ procd_append_param command --db-delete-retention-interval="$db_delete_retention_interval" -- 2.30.2